package com.itheima.mapper;

import com.github.pagehelper.Page;
import com.itheima.pojo.CheckItem;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface CheckItemMapper {
    @Insert("insert into t_checkitem(id, code, name, sex, age, price, type, remark, attention) " +
            "VALUES(#{id},#{code},#{name},#{sex},#{age},#{price},#{type},#{remark},#{attention})")
    void add(CheckItem checkItem);
    @Delete("delete from t_checkitem where id=#{id}")
    void delete(Integer id);
    @Update("update health.t_checkitem set code=#{code},name=#{name},sex=#{sex},age=#{age},price=#{price},type=#{type},remark=#{remark},attention=#{attention} where id=#{id}" )
    void edit(CheckItem checkItem);
    @Select("select *from t_checkitem ")
    Page<CheckItem> page();
    @Select("select *from t_checkitem where id=#{id}")
    CheckItem findById(Integer id);
}
